package com.iwdnb.gkgz.common.utils;

import java.util.Date;

import cn.hutool.core.date.DateUtil;

public class WorkTimeUtils {

    public static boolean isWorkingTime() {
        //return true;
        if (!WorkDayUtils.isWorkDay(new Date())) {
            return false;
        }
        if (!WorkDayUtils.isWeekNormalDay(new Date())) {
            return false;
        }
        String date = DateUtil.formatDate(new Date());
        Date start = DateUtil.parseDateTime(date + " 09:23:00");
        Date end = DateUtil.parseDateTime(date + " 11:31:00");
        Date start2 = DateUtil.parseDateTime(date + " 12:59:00");
        Date end2 = DateUtil.parseDateTime(date + " 15:01:00");
        Date now = new Date();
        if ((now.after(start) && now.before(end))
            || (now.after(start2) && now.before(end2))) {
            return true;
        }
        return false;
    }
}
